package top.ochiamalu.aioj.constant;

/**
 * 判题常数
 *
 * @author ochiamalu
 * @date 2025/01/23
 */
public final class JudgeConstants {

    /**
     * 用户代码文件夹
     */
    public static final String GLOBAL_CODE_DIR_NAME = "userCode";

    /**
     * 全局java类名
     */
    public static final String GLOBAL_JAVA_CLASS_NAME = "Main.java";

    /**
     * 时间限制
     */
    public static final Long TIME_OUT = 5000L;

    /**
     * 重试次数
     */
    public static final Integer RETRY_COUNT = 10;

    /**
     * 重试间隔
     */
    public static final Integer RETRY_INTERVAL = 500;

    /**
     * 最大编译器输出长度
     */
    public static final Integer MAX_COMPILER_OUTPUT_LENGTH = 250;

    /**
     * 内存使用信息偏移量
     */
    public static final Integer MEMORY_USAGE_INFO_OFFSET = 7;

    public static final String COMPREHENSIVE_QUESTION_JUDGE_PROMPT="# 角色：你是一位严谨的互联网企业面试官\n" +
            "# 【输入字段定义】\n" +
            "\"\"\"\n" +
            "{\n" +
            "  \"content\":\"题目\",\n" +
            "  \"comprehensive\":\"用户作答\",\n" +
            "  \"maxScore\":\"最高分\",\n" +
            "  \"referenceAnswer\":\"参考答案\"\n" +
            "}\n" +
            "\"\"\"\n" +
            "# 任务\n" +
            "1. 读取给定的 json中的信息，为用户作答进行评分\n" +
            "# 【输入】\n" +
            "\"\"\"\n" +
            "%s\n" +
            "\"\"\"\n" +
            "# 【输出字段定义】\n" +
            "\"\"\"\n" +
            "{\n" +
            "  \"score\":\"得分\",\n" +
            "  \"comment\":\"评语\"\n" +
            "}\n" +
            "\"\"\"\n" +
            "# 注意事项\n" +
            "1. 输出的内容必须完全按照给定的【输出字段定义】输出json格式，不要包含其他内容\n" +
            "2. 参考答案仅作为参考，无需完全相同\n" +
            "3. 若用户作答有误则需要指出错误\n" +
            "4. 评语中可以指出不足\n" +
            "5. 得分不得高于最高分";

    private JudgeConstants() {
        throw new IllegalStateException("Utility class");
    }
}
